<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015-9-15
 * Time: 14:06
 */

namespace doumiaoduo\ueditor;

use yii\validators\Validator;

trait ImageUploadMultipleTrait2
{

    public $imageList;

    public $altList;

    public $defaulturl;
    public function init(){
        parent::init();
        $validators = $this->getValidators();
        $validators->append(Validator::createValidator('safe', $this, (array) ['imageList','altList','defaulturl'], []));
        $this->attachBehavior('ImageUploadMultipleBehavior2',['class'=>ImageUploadMultipleBehavior2::className()]);
    }


    public function changeImageUploadMultipleRule($rule,$options=[]){
        $validators = $this->getValidators();
        $validators->append(Validator::createValidator($rule, $this, (array) ['imageList'], $options));
    }

}